package com.loser.sale.controller;

import com.loser.module.base.common.ApiResponse;
import com.loser.rpc.sale.dto.resp.UserBalanceResp;
import com.loser.rpc.sale.fallback.BalanceFeignFallBack;
import com.loser.sale.handler.UserBalanceHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试数据 接口
 *
 * @author loser
 * @date 2023-02-05  14:01
 */
@RestController
public class BalanceController extends BalanceFeignFallBack {

    @Autowired
    private UserBalanceHandler userBalanceHandler;

    @Override
    public ApiResponse<UserBalanceResp> getByUserId(Long userId) {
        return userBalanceHandler.getByUserId(userId);
    }

}
